﻿using DAL;
using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class DepartmentBLL
    {
        public DepartmentBLL(DepartmentDAL departmentDAL)
        {
            DepartmentDAL = departmentDAL;
        }

        public DepartmentDAL DepartmentDAL { get; }

        /// <summary>
        /// 科室添加
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int DepartAdd(DepartmentModel info)
        {
            try
            {
                return DepartmentDAL.DepartAdd(info);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 显示查询 
        /// </summary>
        /// <param name="Departmen"></param>
        /// <returns></returns>
        public List<DepartmentModel> GetDepartmentList(string? Departmen = "")
        {
            try
            {
                return DepartmentDAL.GetDepartmentList(Departmen);
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}
